Plot Data
library(ggplot2)
# raw data
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=FALSE, colour="#666666") +
geom_point(aes(colour=Treatment, shape=Experiment), size=2) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
scale_shape_manual(values=14:19) +
scale_color_manual(values=c("#999999","#0072B2","#CC79A7","#009E73"))

# Counts Linear
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts Linear
ggplot(dataset, aes(x=Olaparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts2 Linear
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ x, se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# Counts Quadratic
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts Quadratic
ggplot(dataset, aes(x=Olaparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts2 Quadratic
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 2), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# Counts Cubic
ggplot(dataset, aes(x=Olaparib, y=Counts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts Cubic
ggplot(dataset, aes(x=Olaparib, y=NormCounts)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

# NormCounts2 Cubic
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid=element_blank(), text = element_text(size=14)) +
geom_point(colour="#333333") +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, colour="#666666") +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)")

library(Cairo)
cairo_pdf("Figure1E_v1.pdf", width = 14, height = 4, family = "Arial")
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype)) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, aes(colour = genotype), fill='#DDDDDD', size=0.5) +
facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#000080','#800000','#808080','#808080','#808080'))
dev.off()
## quartz_off_screen
## 2
cairo_pdf("Figure1E_v2.pdf", width = 6, height = 4, family = "Arial")
ggplot(dataset, aes(x=Olaparib, y=NormCounts2)) +
theme_bw() +
theme(panel.grid.major=element_blank(), panel.grid.minor=element_blank(),
axis.line = element_line(colour = "black"), text = element_text(size=14),
panel.border = element_blank(), panel.background = element_blank()) +
geom_point(aes(colour = genotype)) +
geom_smooth(method=lm, formula = y ~ poly(x, 3), se=TRUE, aes(colour = genotype), fill='#DDDDDD', size=0.5) +
#facet_grid(. ~ genotype) +
xlab(label = "Olaparib (log10 nM)") +
ylab(label = "Normalized Counts") +
scale_color_manual(values=c('#000000','#000080','#800000','#808000','#800080','#008080'))
dev.off()
## quartz_off_screen
## 2
Models
library(MASS)
library(DHARMa)
library(lme4)
library(lmerTest)
library(bbmle)
Linear formula
fit1 <- lm(Counts ~ Experiment + Olaparib*genotype, data = dataset)
print(summary(fit1))
##
## Call:
## lm(formula = Counts ~ Experiment + Olaparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -208.60 -82.02 -23.46 69.42 249.76
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 832.86 50.61 16.457 < 2e-16 ***
## Experimentexp2 -62.77 33.70 -1.862 0.065365 .
## Experimentexp3 47.77 33.70 1.417 0.159362
## Experimentexp4 116.27 33.70 3.450 0.000812 ***
## Experimentexp5 -66.31 33.70 -1.968 0.051787 .
## Olaparib -43.72 20.32 -2.152 0.033740 *
## genotypeALC1KO -61.24 64.91 -0.943 0.347680
## genotypeALC1KO+ALC1WT -180.36 64.91 -2.779 0.006481 **
## genotypeALC1KO+ALC1G750E 57.87 64.91 0.891 0.374732
## genotypeALC1KO+ALC1E175Q -362.86 64.91 -5.590 1.84e-07 ***
## genotypeALC1KO+ALC1K77R -226.00 64.91 -3.482 0.000730 ***
## Olaparib:genotypeALC1KO -143.24 28.74 -4.984 2.49e-06 ***
## Olaparib:genotypeALC1KO+ALC1WT -59.81 28.74 -2.081 0.039877 *
## Olaparib:genotypeALC1KO+ALC1G750E -149.15 28.74 -5.190 1.05e-06 ***
## Olaparib:genotypeALC1KO+ALC1E175Q -82.04 28.74 -2.855 0.005201 **
## Olaparib:genotypeALC1KO+ALC1K77R -100.51 28.74 -3.497 0.000693 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 116.8 on 104 degrees of freedom
## Multiple R-squared: 0.8446, Adjusted R-squared: 0.8222
## F-statistic: 37.68 on 15 and 104 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit1))
## AIC: 1499.788
simres <- simulateResiduals(fittedModel = fit1)
plot(simres)

fit2 <- lm(NormCounts ~ Olaparib*genotype, data = dataset)
print(summary(fit2))
##
## Call:
## lm(formula = NormCounts ~ Olaparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.38749 -0.11961 -0.00834 0.09735 0.51585
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.10763 0.07142 15.508 < 2e-16 ***
## Olaparib -0.05793 0.03162 -1.832 0.06968 .
## genotypeALC1KO 0.71591 0.10101 7.088 1.47e-10 ***
## genotypeALC1KO+ALC1WT 0.34102 0.10101 3.376 0.00102 **
## genotypeALC1KO+ALC1G750E 0.57509 0.10101 5.694 1.08e-07 ***
## genotypeALC1KO+ALC1E175Q 0.86054 0.10101 8.520 1.05e-13 ***
## genotypeALC1KO+ALC1K77R 0.70213 0.10101 6.951 2.87e-10 ***
## Olaparib:genotypeALC1KO -0.38535 0.04472 -8.618 6.32e-14 ***
## Olaparib:genotypeALC1KO+ALC1WT -0.18356 0.04472 -4.105 7.88e-05 ***
## Olaparib:genotypeALC1KO+ALC1G750E -0.30955 0.04472 -6.922 3.31e-10 ***
## Olaparib:genotypeALC1KO+ALC1E175Q -0.46319 0.04472 -10.358 < 2e-16 ***
## Olaparib:genotypeALC1KO+ALC1K77R -0.37793 0.04472 -8.452 1.49e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1817 on 108 degrees of freedom
## Multiple R-squared: 0.8878, Adjusted R-squared: 0.8764
## F-statistic: 77.72 on 11 and 108 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit2))
## AIC: -55.43504
simres <- simulateResiduals(fittedModel = fit2)
plot(simres)

fit3 <- lm(NormCounts2 ~ Olaparib*genotype, data = dataset)
print(summary(fit3))
##
## Call:
## lm(formula = NormCounts2 ~ Olaparib * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.298184 -0.079735 -0.005049 0.074646 0.314565
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.0345920 0.0476975 21.691 < 2e-16 ***
## Olaparib -0.0541132 0.0211165 -2.563 0.0118 *
## genotypeALC1KO 0.0352449 0.0674545 0.522 0.6024
## genotypeALC1KO+ALC1WT 0.0801845 0.0674545 1.189 0.2372
## genotypeALC1KO+ALC1G750E 0.0643540 0.0674545 0.954 0.3422
## genotypeALC1KO+ALC1E175Q -0.0006134 0.0674545 -0.009 0.9928
## genotypeALC1KO+ALC1K77R 0.0689924 0.0674545 1.023 0.3087
## Olaparib:genotypeALC1KO -0.2059504 0.0298632 -6.896 3.76e-10 ***
## Olaparib:genotypeALC1KO+ALC1WT -0.1317215 0.0298632 -4.411 2.44e-05 ***
## Olaparib:genotypeALC1KO+ALC1G750E -0.1858794 0.0298632 -6.224 9.42e-09 ***
## Olaparib:genotypeALC1KO+ALC1E175Q -0.2196611 0.0298632 -7.356 3.90e-11 ***
## Olaparib:genotypeALC1KO+ALC1K77R -0.2116736 0.0298632 -7.088 1.47e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1213 on 108 degrees of freedom
## Multiple R-squared: 0.8863, Adjusted R-squared: 0.8747
## F-statistic: 76.54 on 11 and 108 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit3))
## AIC: -152.3274
simres <- simulateResiduals(fittedModel = fit3)
plot(simres)

fit4 <- lmer(Counts ~ Olaparib*genotype + (1|UID), data = dataset)
print(summary(fit4))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ Olaparib * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 1370.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -1.73359 -0.65041 0.02685 0.54525 2.16261
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 10592 102.92
## Residual 9021 94.98
## Number of obs: 120, groups: UID, 30
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 839.86 59.27 43.19 14.170 < 2e-16
## Olaparib -43.72 16.53 84.00 -2.645 0.009752
## genotypeALC1KO -61.24 83.82 43.19 -0.731 0.468971
## genotypeALC1KO+ALC1WT -180.36 83.82 43.19 -2.152 0.037044
## genotypeALC1KO+ALC1G750E 57.87 83.82 43.19 0.690 0.493631
## genotypeALC1KO+ALC1E175Q -362.86 83.82 43.19 -4.329 8.73e-05
## genotypeALC1KO+ALC1K77R -226.00 83.82 43.19 -2.696 0.009954
## Olaparib:genotypeALC1KO -143.24 23.38 84.00 -6.127 2.78e-08
## Olaparib:genotypeALC1KO+ALC1WT -59.81 23.38 84.00 -2.558 0.012315
## Olaparib:genotypeALC1KO+ALC1G750E -149.15 23.38 84.00 -6.380 9.23e-09
## Olaparib:genotypeALC1KO+ALC1E175Q -82.04 23.38 84.00 -3.509 0.000725
## Olaparib:genotypeALC1KO+ALC1K77R -100.51 23.38 84.00 -4.299 4.60e-05
##
## (Intercept) ***
## Olaparib **
## genotypeALC1KO
## genotypeALC1KO+ALC1WT *
## genotypeALC1KO+ALC1G750E
## genotypeALC1KO+ALC1E175Q ***
## genotypeALC1KO+ALC1K77R **
## Olaparib:genotypeALC1KO ***
## Olaparib:genotypeALC1KO+ALC1WT *
## Olaparib:genotypeALC1KO+ALC1G750E ***
## Olaparib:genotypeALC1KO+ALC1E175Q ***
## Olaparib:genotypeALC1KO+ALC1K77R ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) Olaprb gnALC1KO gALC1KO+ALC1W gALC1KO+ALC1G gALC1KO+ALC1E
## Olaparib -0.518
## gntypALC1KO -0.707 0.366
## gALC1KO+ALC1W -0.707 0.366 0.500
## gALC1KO+ALC1G -0.707 0.366 0.500 0.500
## gALC1KO+ALC1E -0.707 0.366 0.500 0.500 0.500
## gALC1KO+ALC1K -0.707 0.366 0.500 0.500 0.500 0.500
## Olpr:ALC1KO 0.366 -0.707 -0.518 -0.259 -0.259 -0.259
## O:ALC1KO+ALC1W 0.366 -0.707 -0.259 -0.518 -0.259 -0.259
## O:ALC1KO+ALC1G 0.366 -0.707 -0.259 -0.259 -0.518 -0.259
## O:ALC1KO+ALC1E 0.366 -0.707 -0.259 -0.259 -0.259 -0.518
## O:ALC1KO+ALC1K 0.366 -0.707 -0.259 -0.259 -0.259 -0.259
## gALC1KO+ALC1K Ol:ALC1KO O:ALC1KO+ALC1W O:ALC1KO+ALC1G
## Olaparib
## gntypALC1KO
## gALC1KO+ALC1W
## gALC1KO+ALC1G
## gALC1KO+ALC1E
## gALC1KO+ALC1K
## Olpr:ALC1KO -0.259
## O:ALC1KO+ALC1W -0.259 0.500
## O:ALC1KO+ALC1G -0.259 0.500 0.500
## O:ALC1KO+ALC1E -0.259 0.500 0.500 0.500
## O:ALC1KO+ALC1K -0.518 0.500 0.500 0.500
## O:ALC1KO+ALC1E
## Olaparib
## gntypALC1KO
## gALC1KO+ALC1W
## gALC1KO+ALC1G
## gALC1KO+ALC1E
## gALC1KO+ALC1K
## Olpr:ALC1KO
## O:ALC1KO+ALC1W
## O:ALC1KO+ALC1G
## O:ALC1KO+ALC1E
## O:ALC1KO+ALC1K 0.500
cat("AIC: ", AIC(fit4))
## AIC: 1398.794
simres <- simulateResiduals(fittedModel = fit4)
plot(simres)

Quadratic formula
fit5 <- lm(Counts ~ Experiment + poly(Olaparib, 2)*genotype, data = dataset)
print(summary(fit5))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 2) * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -183.15 -64.81 -11.16 69.43 199.47
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 751.63 28.12 26.730
## Experimentexp2 -62.77 28.12 -2.232
## Experimentexp3 47.77 28.12 1.699
## Experimentexp4 116.27 28.12 4.135
## Experimentexp5 -66.31 28.12 -2.358
## poly(Olaparib, 2)1 -615.34 238.60 -2.579
## poly(Olaparib, 2)2 -413.83 238.60 -1.734
## genotypeALC1KO -327.35 30.80 -10.627
## genotypeALC1KO+ALC1WT -291.47 30.80 -9.463
## genotypeALC1KO+ALC1G750E -219.22 30.80 -7.117
## genotypeALC1KO+ALC1E175Q -515.27 30.80 -16.728
## genotypeALC1KO+ALC1K77R -412.72 30.80 -13.399
## poly(Olaparib, 2)1:genotypeALC1KO -2015.86 337.43 -5.974
## poly(Olaparib, 2)2:genotypeALC1KO -123.21 337.43 -0.365
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT -841.71 337.43 -2.494
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT -477.26 337.43 -1.414
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E -2099.03 337.43 -6.221
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E -658.35 337.43 -1.951
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q -1154.55 337.43 -3.422
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 252.02 337.43 0.747
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R -1414.46 337.43 -4.192
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R -291.44 337.43 -0.864
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## Experimentexp2 0.027871 *
## Experimentexp3 0.092516 .
## Experimentexp4 7.50e-05 ***
## Experimentexp5 0.020346 *
## poly(Olaparib, 2)1 0.011396 *
## poly(Olaparib, 2)2 0.085990 .
## genotypeALC1KO < 2e-16 ***
## genotypeALC1KO+ALC1WT 1.78e-15 ***
## genotypeALC1KO+ALC1G750E 1.84e-10 ***
## genotypeALC1KO+ALC1E175Q < 2e-16 ***
## genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 2)1:genotypeALC1KO 3.73e-08 ***
## poly(Olaparib, 2)2:genotypeALC1KO 0.715803
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT 0.014287 *
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT 0.160418
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E 1.22e-08 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E 0.053906 .
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q 0.000909 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 0.456926
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R 6.07e-05 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R 0.389858
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 97.41 on 98 degrees of freedom
## Multiple R-squared: 0.8981, Adjusted R-squared: 0.8762
## F-statistic: 41.12 on 21 and 98 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit5))
## AIC: 1461.179
simres <- simulateResiduals(fittedModel = fit5)
plot(simres)

fit6 <- lm(NormCounts ~ poly(Olaparib, 2)*genotype, data = dataset)
print(summary(fit6))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 2) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.28798 -0.06115 -0.01004 0.06064 0.30835
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.508e-02 39.879
## poly(Olaparib, 2)1 -8.153e-01 2.747e-01 -2.968
## poly(Olaparib, 2)2 -5.496e-01 2.747e-01 -2.001
## genotypeALC1KO 2.722e-16 3.546e-02 0.000
## genotypeALC1KO+ALC1WT -4.881e-16 3.546e-02 0.000
## genotypeALC1KO+ALC1G750E -8.063e-16 3.546e-02 0.000
## genotypeALC1KO+ALC1E175Q 3.927e-17 3.546e-02 0.000
## genotypeALC1KO+ALC1K77R -3.256e-16 3.546e-02 0.000
## poly(Olaparib, 2)1:genotypeALC1KO -5.423e+00 3.885e-01 -13.960
## poly(Olaparib, 2)2:genotypeALC1KO -7.516e-01 3.885e-01 -1.935
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT -2.583e+00 3.885e-01 -6.650
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT -1.442e+00 3.885e-01 -3.712
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E -4.356e+00 3.885e-01 -11.214
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E -1.352e+00 3.885e-01 -3.480
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q -6.519e+00 3.885e-01 -16.780
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q -1.132e-01 3.885e-01 -0.291
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R -5.319e+00 3.885e-01 -13.692
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R -1.367e+00 3.885e-01 -3.519
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 0.003734 **
## poly(Olaparib, 2)2 0.048085 *
## genotypeALC1KO 1.000000
## genotypeALC1KO+ALC1WT 1.000000
## genotypeALC1KO+ALC1G750E 1.000000
## genotypeALC1KO+ALC1E175Q 1.000000
## genotypeALC1KO+ALC1K77R 1.000000
## poly(Olaparib, 2)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO 0.055786 .
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT 1.48e-09 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT 0.000335 ***
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E 0.000739 ***
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 0.771262
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R 0.000648 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1121 on 102 degrees of freedom
## Multiple R-squared: 0.9596, Adjusted R-squared: 0.9529
## F-statistic: 142.7 on 17 and 102 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit6))
## AIC: -166.0738
simres <- simulateResiduals(fittedModel = fit6)
plot(simres)

fit7 <- lm(NormCounts2 ~ poly(Olaparib, 2)*genotype, data = dataset)
print(summary(fit7))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 2) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.17561 -0.03909 -0.00634 0.04860 0.18803
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.93406 0.01645 56.766
## poly(Olaparib, 2)1 -0.76156 0.18025 -4.225
## poly(Olaparib, 2)2 -0.51333 0.18025 -2.848
## genotypeALC1KO -0.34738 0.02327 -14.928
## genotypeALC1KO+ALC1WT -0.16453 0.02327 -7.071
## genotypeALC1KO+ALC1G750E -0.28098 0.02327 -12.075
## genotypeALC1KO+ALC1E175Q -0.40871 0.02327 -17.564
## genotypeALC1KO+ALC1K77R -0.32426 0.02327 -13.935
## poly(Olaparib, 2)1:genotypeALC1KO -2.89844 0.25491 -11.370
## poly(Olaparib, 2)2:genotypeALC1KO -0.25005 0.25491 -0.981
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT -1.85378 0.25491 -7.272
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT -1.01926 0.25491 -3.998
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E -2.61597 0.25491 -10.262
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E -0.72845 0.25491 -2.858
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q -3.09140 0.25491 -12.127
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 0.16512 0.25491 0.648
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R -2.97898 0.25491 -11.686
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R -0.65544 0.25491 -2.571
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 2)1 5.21e-05 ***
## poly(Olaparib, 2)2 0.005323 **
## genotypeALC1KO < 2e-16 ***
## genotypeALC1KO+ALC1WT 1.97e-10 ***
## genotypeALC1KO+ALC1G750E < 2e-16 ***
## genotypeALC1KO+ALC1E175Q < 2e-16 ***
## genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 2)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO 0.328948
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT 7.42e-11 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT 0.000121 ***
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E 0.005174 **
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 0.518592
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R 0.011576 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07359 on 102 degrees of freedom
## Multiple R-squared: 0.9605, Adjusted R-squared: 0.9539
## F-statistic: 145.9 on 17 and 102 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit7))
## AIC: -267.1881
simres <- simulateResiduals(fittedModel = fit7)
plot(simres)

fit8 <- lmer(Counts ~ poly(Olaparib, 2)*genotype + (1|UID), data = dataset)
print(summary(fit8))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 2) * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 1181.9
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.48528 -0.55156 -0.00367 0.56484 2.07079
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 11982 109.46
## Residual 3461 58.83
## Number of obs: 120, groups: UID, 30
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 758.62 50.69 24.00
## poly(Olaparib, 2)1 -615.34 144.11 78.00
## poly(Olaparib, 2)2 -413.83 144.11 78.00
## genotypeALC1KO -327.35 71.69 24.00
## genotypeALC1KO+ALC1WT -291.47 71.69 24.00
## genotypeALC1KO+ALC1G750E -219.22 71.69 24.00
## genotypeALC1KO+ALC1E175Q -515.27 71.69 24.00
## genotypeALC1KO+ALC1K77R -412.72 71.69 24.00
## poly(Olaparib, 2)1:genotypeALC1KO -2015.86 203.80 78.00
## poly(Olaparib, 2)2:genotypeALC1KO -123.21 203.80 78.00
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT -841.71 203.80 78.00
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT -477.26 203.80 78.00
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E -2099.03 203.80 78.00
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E -658.35 203.80 78.00
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q -1154.55 203.80 78.00
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 252.02 203.80 78.00
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R -1414.46 203.80 78.00
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R -291.44 203.80 78.00
## t value Pr(>|t|)
## (Intercept) 14.966 1.14e-13 ***
## poly(Olaparib, 2)1 -4.270 5.46e-05 ***
## poly(Olaparib, 2)2 -2.872 0.005256 **
## genotypeALC1KO -4.566 0.000125 ***
## genotypeALC1KO+ALC1WT -4.066 0.000446 ***
## genotypeALC1KO+ALC1G750E -3.058 0.005403 **
## genotypeALC1KO+ALC1E175Q -7.188 1.99e-07 ***
## genotypeALC1KO+ALC1K77R -5.757 6.20e-06 ***
## poly(Olaparib, 2)1:genotypeALC1KO -9.891 2.04e-15 ***
## poly(Olaparib, 2)2:genotypeALC1KO -0.605 0.547239
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1WT -4.130 9.03e-05 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1WT -2.342 0.021745 *
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1G750E -10.299 3.36e-16 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1G750E -3.230 0.001811 **
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1E175Q -5.665 2.36e-07 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1E175Q 1.237 0.219946
## poly(Olaparib, 2)1:genotypeALC1KO+ALC1K77R -6.940 1.02e-09 ***
## poly(Olaparib, 2)2:genotypeALC1KO+ALC1K77R -1.430 0.156701
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit8))
## AIC: 1221.92
simres <- simulateResiduals(fittedModel = fit8)
plot(simres)

Cubic formula
fit9 <- lm(Counts ~ Experiment + poly(Olaparib, 3)*genotype, data = dataset)
print(summary(fit9))
##
## Call:
## lm(formula = Counts ~ Experiment + poly(Olaparib, 3) * genotype,
## data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -169.74 -66.56 -14.64 75.27 203.79
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 751.63 28.41 26.459
## Experimentexp2 -62.77 28.41 -2.210
## Experimentexp3 47.77 28.41 1.682
## Experimentexp4 116.27 28.41 4.093
## Experimentexp5 -66.31 28.41 -2.334
## poly(Olaparib, 3)1 -615.34 241.05 -2.553
## poly(Olaparib, 3)2 -413.83 241.05 -1.717
## poly(Olaparib, 3)3 -254.21 241.05 -1.055
## genotypeALC1KO -327.35 31.12 -10.519
## genotypeALC1KO+ALC1WT -291.48 31.12 -9.366
## genotypeALC1KO+ALC1G750E -219.23 31.12 -7.045
## genotypeALC1KO+ALC1E175Q -515.28 31.12 -16.558
## genotypeALC1KO+ALC1K77R -412.72 31.12 -13.263
## poly(Olaparib, 3)1:genotypeALC1KO -2015.86 340.89 -5.913
## poly(Olaparib, 3)2:genotypeALC1KO -123.21 340.89 -0.361
## poly(Olaparib, 3)3:genotypeALC1KO 420.29 340.89 1.233
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT -841.71 340.89 -2.469
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT -477.26 340.89 -1.400
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT -72.90 340.89 -0.214
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E -2099.03 340.89 -6.157
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E -658.35 340.89 -1.931
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 111.29 340.89 0.326
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q -1154.55 340.89 -3.387
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 252.02 340.89 0.739
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 333.23 340.89 0.978
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R -1414.46 340.89 -4.149
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R -291.44 340.89 -0.855
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 341.99 340.89 1.003
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## Experimentexp2 0.02961 *
## Experimentexp3 0.09603 .
## Experimentexp4 9.13e-05 ***
## Experimentexp5 0.02176 *
## poly(Olaparib, 3)1 0.01233 *
## poly(Olaparib, 3)2 0.08938 .
## poly(Olaparib, 3)3 0.29437
## genotypeALC1KO < 2e-16 ***
## genotypeALC1KO+ALC1WT 4.91e-15 ***
## genotypeALC1KO+ALC1G750E 3.31e-10 ***
## genotypeALC1KO+ALC1E175Q < 2e-16 ***
## genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 3)1:genotypeALC1KO 5.64e-08 ***
## poly(Olaparib, 3)2:genotypeALC1KO 0.71861
## poly(Olaparib, 3)3:genotypeALC1KO 0.22075
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT 0.01539 *
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT 0.16487
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT 0.83115
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E 1.91e-08 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E 0.05653 .
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 0.74482
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q 0.00104 **
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 0.46161
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 0.33087
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R 7.43e-05 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R 0.39481
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 0.31838
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 98.41 on 92 degrees of freedom
## Multiple R-squared: 0.9023, Adjusted R-squared: 0.8737
## F-statistic: 31.48 on 27 and 92 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit9))
## AIC: 1468.047
simres <- simulateResiduals(fittedModel = fit9)
plot(simres)

fit10 <- lm(NormCounts ~ poly(Olaparib, 3)*genotype, data = dataset)
print(summary(fit10))
##
## Call:
## lm(formula = NormCounts ~ poly(Olaparib, 3) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.233049 -0.063718 -0.005164 0.045388 0.262288
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 1.000e+00 2.403e-02 41.615
## poly(Olaparib, 3)1 -8.153e-01 2.632e-01 -3.097
## poly(Olaparib, 3)2 -5.496e-01 2.632e-01 -2.088
## poly(Olaparib, 3)3 -3.309e-01 2.632e-01 -1.257
## genotypeALC1KO 8.034e-16 3.398e-02 0.000
## genotypeALC1KO+ALC1WT 1.882e-17 3.398e-02 0.000
## genotypeALC1KO+ALC1G750E -8.380e-17 3.398e-02 0.000
## genotypeALC1KO+ALC1E175Q -5.151e-16 3.398e-02 0.000
## genotypeALC1KO+ALC1K77R -1.507e-16 3.398e-02 0.000
## poly(Olaparib, 3)1:genotypeALC1KO -5.423e+00 3.723e-01 -14.568
## poly(Olaparib, 3)2:genotypeALC1KO -7.516e-01 3.723e-01 -2.019
## poly(Olaparib, 3)3:genotypeALC1KO 7.530e-01 3.723e-01 2.023
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT -2.583e+00 3.723e-01 -6.939
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT -1.442e+00 3.723e-01 -3.874
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT -2.937e-01 3.723e-01 -0.789
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E -4.356e+00 3.723e-01 -11.702
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E -1.352e+00 3.723e-01 -3.631
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 8.477e-02 3.723e-01 0.228
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q -6.519e+00 3.723e-01 -17.511
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q -1.132e-01 3.723e-01 -0.304
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 7.013e-01 3.723e-01 1.884
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R -5.319e+00 3.723e-01 -14.288
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R -1.367e+00 3.723e-01 -3.672
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 7.421e-01 3.723e-01 1.993
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 0.002560 **
## poly(Olaparib, 3)2 0.039467 *
## poly(Olaparib, 3)3 0.211811
## genotypeALC1KO 1.000000
## genotypeALC1KO+ALC1WT 1.000000
## genotypeALC1KO+ALC1G750E 1.000000
## genotypeALC1KO+ALC1E175Q 1.000000
## genotypeALC1KO+ALC1K77R 1.000000
## poly(Olaparib, 3)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO 0.046273 *
## poly(Olaparib, 3)3:genotypeALC1KO 0.045893 *
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT 4.62e-10 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT 0.000196 ***
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT 0.432117
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E 0.000455 ***
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 0.820346
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 0.761641
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 0.062616 .
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R 0.000395 ***
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 0.049054 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1075 on 96 degrees of freedom
## Multiple R-squared: 0.9651, Adjusted R-squared: 0.9568
## F-statistic: 115.5 on 23 and 96 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit10))
## AIC: -171.5765
simres <- simulateResiduals(fittedModel = fit10)
plot(simres)

fit11 <- lm(NormCounts2 ~ poly(Olaparib, 3)*genotype, data = dataset)
print(summary(fit11))
##
## Call:
## lm(formula = NormCounts2 ~ poly(Olaparib, 3) * genotype, data = dataset)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142112 -0.042428 -0.003688 0.031983 0.161550
##
## Coefficients:
## Estimate Std. Error t value
## (Intercept) 0.93406 0.01559 59.918
## poly(Olaparib, 3)1 -0.76156 0.17077 -4.460
## poly(Olaparib, 3)2 -0.51333 0.17077 -3.006
## poly(Olaparib, 3)3 -0.30906 0.17077 -1.810
## genotypeALC1KO -0.34738 0.02205 -15.757
## genotypeALC1KO+ALC1WT -0.16453 0.02205 -7.463
## genotypeALC1KO+ALC1G750E -0.28098 0.02205 -12.745
## genotypeALC1KO+ALC1E175Q -0.40871 0.02205 -18.539
## genotypeALC1KO+ALC1K77R -0.32426 0.02205 -14.708
## poly(Olaparib, 3)1:genotypeALC1KO -2.89844 0.24150 -12.002
## poly(Olaparib, 3)2:genotypeALC1KO -0.25005 0.24150 -1.035
## poly(Olaparib, 3)3:genotypeALC1KO 0.55668 0.24150 2.305
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT -1.85378 0.24150 -7.676
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT -1.01926 0.24150 -4.220
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT -0.17155 0.24150 -0.710
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E -2.61597 0.24150 -10.832
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E -0.72845 0.24150 -3.016
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 0.14833 0.24150 0.614
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q -3.09140 0.24150 -12.801
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 0.16512 0.24150 0.684
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 0.50365 0.24150 2.085
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R -2.97898 0.24150 -12.335
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R -0.65544 0.24150 -2.714
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 0.55981 0.24150 2.318
## Pr(>|t|)
## (Intercept) < 2e-16 ***
## poly(Olaparib, 3)1 2.23e-05 ***
## poly(Olaparib, 3)2 0.00338 **
## poly(Olaparib, 3)3 0.07346 .
## genotypeALC1KO < 2e-16 ***
## genotypeALC1KO+ALC1WT 3.82e-11 ***
## genotypeALC1KO+ALC1G750E < 2e-16 ***
## genotypeALC1KO+ALC1E175Q < 2e-16 ***
## genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 3)1:genotypeALC1KO < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO 0.30309
## poly(Olaparib, 3)3:genotypeALC1KO 0.02332 *
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT 1.37e-11 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT 5.53e-05 ***
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT 0.47921
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E 0.00327 **
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 0.54053
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 0.49580
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 0.03968 *
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R 0.00788 **
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 0.02257 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06972 on 96 degrees of freedom
## Multiple R-squared: 0.9666, Adjusted R-squared: 0.9586
## F-statistic: 120.9 on 23 and 96 DF, p-value: < 2.2e-16
cat("AIC: ", AIC(fit11))
## AIC: -275.4297
simres <- simulateResiduals(fittedModel = fit11)
plot(simres)

fit12 <- lmer(Counts ~ poly(Olaparib, 3)*genotype + (1|UID), data = dataset)
print(summary(fit12))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(Olaparib, 3) * genotype + (1 | UID)
## Data: dataset
##
## REML criterion at convergence: 1099.8
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.28860 -0.46993 -0.00876 0.55742 2.09019
##
## Random effects:
## Groups Name Variance Std.Dev.
## UID (Intercept) 12045 109.75
## Residual 3209 56.65
## Number of obs: 120, groups: UID, 30
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 758.62 50.69 24.00
## poly(Olaparib, 3)1 -615.34 138.76 72.00
## poly(Olaparib, 3)2 -413.83 138.76 72.00
## poly(Olaparib, 3)3 -254.21 138.76 72.00
## genotypeALC1KO -327.35 71.69 24.00
## genotypeALC1KO+ALC1WT -291.47 71.69 24.00
## genotypeALC1KO+ALC1G750E -219.22 71.69 24.00
## genotypeALC1KO+ALC1E175Q -515.27 71.69 24.00
## genotypeALC1KO+ALC1K77R -412.72 71.69 24.00
## poly(Olaparib, 3)1:genotypeALC1KO -2015.86 196.23 72.00
## poly(Olaparib, 3)2:genotypeALC1KO -123.21 196.23 72.00
## poly(Olaparib, 3)3:genotypeALC1KO 420.29 196.23 72.00
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT -841.71 196.23 72.00
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT -477.26 196.23 72.00
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT -72.90 196.23 72.00
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E -2099.03 196.23 72.00
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E -658.35 196.23 72.00
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 111.29 196.23 72.00
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q -1154.55 196.23 72.00
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 252.02 196.23 72.00
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 333.23 196.23 72.00
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R -1414.46 196.23 72.00
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R -291.44 196.23 72.00
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 341.99 196.23 72.00
## t value Pr(>|t|)
## (Intercept) 14.966 1.14e-13 ***
## poly(Olaparib, 3)1 -4.435 3.24e-05 ***
## poly(Olaparib, 3)2 -2.982 0.003901 **
## poly(Olaparib, 3)3 -1.832 0.071086 .
## genotypeALC1KO -4.566 0.000125 ***
## genotypeALC1KO+ALC1WT -4.066 0.000446 ***
## genotypeALC1KO+ALC1G750E -3.058 0.005403 **
## genotypeALC1KO+ALC1E175Q -7.188 1.99e-07 ***
## genotypeALC1KO+ALC1K77R -5.757 6.20e-06 ***
## poly(Olaparib, 3)1:genotypeALC1KO -10.273 9.35e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO -0.628 0.532087
## poly(Olaparib, 3)3:genotypeALC1KO 2.142 0.035595 *
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1WT -4.289 5.48e-05 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1WT -2.432 0.017500 *
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1WT -0.371 0.711374
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1G750E -10.697 < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1G750E -3.355 0.001269 **
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1G750E 0.567 0.572396
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1E175Q -5.884 1.17e-07 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1E175Q 1.284 0.203160
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1E175Q 1.698 0.093796 .
## poly(Olaparib, 3)1:genotypeALC1KO+ALC1K77R -7.208 4.56e-10 ***
## poly(Olaparib, 3)2:genotypeALC1KO+ALC1K77R -1.485 0.141863
## poly(Olaparib, 3)3:genotypeALC1KO+ALC1K77R 1.743 0.085638 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit12))
## AIC: 1151.797
simres <- simulateResiduals(fittedModel = fit12)
plot(simres)

Final Result
fit <- fit11
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in WT |
-0.7615607 |
0.1707689 |
-4.4595983 |
0.0000223 |
| Olaparib2 in WT |
-0.5133272 |
0.1707689 |
-3.0059757 |
0.0033782 |
| Olaparib3 in WT |
-0.3090577 |
0.1707689 |
-1.8098008 |
0.0734558 |
| Olaparib1: WT vs. ALC1KO |
-2.8984400 |
0.2415037 |
-12.0016380 |
0.0000000 |
| Olaparib2: WT vs. ALC1KO |
-0.2500492 |
0.2415037 |
-1.0353846 |
0.3030904 |
| Olaparib3: WT vs. ALC1KO |
0.5566813 |
0.2415037 |
2.3050634 |
0.0233168 |
| Olaparib1: WT vs. ALC1KO+ALC1WT |
-1.8537807 |
0.2415037 |
-7.6759928 |
0.0000000 |
| Olaparib2: WT vs. ALC1KO+ALC1WT |
-1.0192558 |
0.2415037 |
-4.2204563 |
0.0000553 |
| Olaparib3: WT vs. ALC1KO+ALC1WT |
-0.1715527 |
0.2415037 |
-0.7103521 |
0.4792079 |
| Olaparib1: WT vs. ALC1KO+ALC1G750E |
-2.6159699 |
0.2415037 |
-10.8320074 |
0.0000000 |
| Olaparib2: WT vs. ALC1KO+ALC1G750E |
-0.7284510 |
0.2415037 |
-3.0163141 |
0.0032748 |
| Olaparib3: WT vs. ALC1KO+ALC1G750E |
0.1483334 |
0.2415037 |
0.6142076 |
0.5405310 |
| Olaparib1: WT vs. ALC1KO+ALC1E175Q |
-3.0913962 |
0.2415037 |
-12.8006161 |
0.0000000 |
| Olaparib2: WT vs. ALC1KO+ALC1E175Q |
0.1651223 |
0.2415037 |
0.6837258 |
0.4957953 |
| Olaparib3: WT vs. ALC1KO+ALC1E175Q |
0.5036484 |
0.2415037 |
2.0854687 |
0.0396798 |
| Olaparib1: WT vs. ALC1KO+ALC1K77R |
-2.9789849 |
0.2415037 |
-12.3351520 |
0.0000000 |
| Olaparib2: WT vs. ALC1KO+ALC1K77R |
-0.6554356 |
0.2415037 |
-2.7139772 |
0.0078818 |
| Olaparib3: WT vs. ALC1KO+ALC1K77R |
0.5598070 |
0.2415037 |
2.3180059 |
0.0225722 |
write.table(output, file = "Figure1E_Stats_Ref_WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1KO")
fit <- lm(NormCounts2 ~ poly(Olaparib, 3)*genotype, data = dataset)
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in ALC1KO |
-3.6600008 |
0.1707689 |
-21.4324775 |
0.0000000 |
| Olaparib2 in ALC1KO |
-0.7633764 |
0.1707689 |
-4.4702307 |
0.0000214 |
| Olaparib3 in ALC1KO |
0.2476236 |
0.1707689 |
1.4500511 |
0.1503036 |
| Olaparib1: ALC1KO vs. WT |
2.8984400 |
0.2415037 |
12.0016380 |
0.0000000 |
| Olaparib2: ALC1KO vs. WT |
0.2500492 |
0.2415037 |
1.0353846 |
0.3030904 |
| Olaparib3: ALC1KO vs. WT |
-0.5566813 |
0.2415037 |
-2.3050634 |
0.0233168 |
| Olaparib1: ALC1KO vs. ALC1KO+ALC1WT |
1.0446593 |
0.2415037 |
4.3256452 |
0.0000372 |
| Olaparib2: ALC1KO vs. ALC1KO+ALC1WT |
-0.7692066 |
0.2415037 |
-3.1850717 |
0.0019521 |
| Olaparib3: ALC1KO vs. ALC1KO+ALC1WT |
-0.7282340 |
0.2415037 |
-3.0154155 |
0.0032837 |
| Olaparib1: ALC1KO vs. ALC1KO+ALC1G750E |
0.2824701 |
0.2415037 |
1.1696306 |
0.2450454 |
| Olaparib2: ALC1KO vs. ALC1KO+ALC1G750E |
-0.4784018 |
0.2415037 |
-1.9809295 |
0.0504605 |
| Olaparib3: ALC1KO vs. ALC1KO+ALC1G750E |
-0.4083479 |
0.2415037 |
-1.6908558 |
0.0941087 |
| Olaparib1: ALC1KO vs. ALC1KO+ALC1E175Q |
-0.1929562 |
0.2415037 |
-0.7989781 |
0.4262754 |
| Olaparib2: ALC1KO vs. ALC1KO+ALC1E175Q |
0.4151715 |
0.2415037 |
1.7191104 |
0.0888172 |
| Olaparib3: ALC1KO vs. ALC1KO+ALC1E175Q |
-0.0530329 |
0.2415037 |
-0.2195947 |
0.8266531 |
| Olaparib1: ALC1KO vs. ALC1KO+ALC1K77R |
-0.0805449 |
0.2415037 |
-0.3335140 |
0.7394737 |
| Olaparib2: ALC1KO vs. ALC1KO+ALC1K77R |
-0.4053863 |
0.2415037 |
-1.6785926 |
0.0964839 |
| Olaparib3: ALC1KO vs. ALC1KO+ALC1K77R |
0.0031257 |
0.2415037 |
0.0129425 |
0.9897005 |
write.table(output, file = "Figure1E_Stats_Ref_ALC1KO.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1 KO + ALC1 WT reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1KO+ALC1WT")
fit <- lm(NormCounts2 ~ poly(Olaparib, 3)*genotype, data = dataset)
output <- coef(summary(fit))
output <- output[grep("Olaparib", rownames(output)),]
rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype", paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1], sep = " in " )
# suggested result table
kable(output, row.names = T)
| Olaparib1 in ALC1KO+ALC1WT |
-2.6153414 |
0.1707689 |
-15.3150914 |
0.0000000 |
| Olaparib2 in ALC1KO+ALC1WT |
-1.5325830 |
0.1707689 |
-8.9746023 |
0.0000000 |
| Olaparib3 in ALC1KO+ALC1WT |
-0.4806104 |
0.1707689 |
-2.8143903 |
0.0059292 |
| Olaparib1: ALC1KO+ALC1WT vs. ALC1KO |
-1.0446593 |
0.2415037 |
-4.3256452 |
0.0000372 |
| Olaparib2: ALC1KO+ALC1WT vs. ALC1KO |
0.7692066 |
0.2415037 |
3.1850717 |
0.0019521 |
| Olaparib3: ALC1KO+ALC1WT vs. ALC1KO |
0.7282340 |
0.2415037 |
3.0154155 |
0.0032837 |
| Olaparib1: ALC1KO+ALC1WT vs. WT |
1.8537807 |
0.2415037 |
7.6759928 |
0.0000000 |
| Olaparib2: ALC1KO+ALC1WT vs. WT |
1.0192558 |
0.2415037 |
4.2204563 |
0.0000553 |
| Olaparib3: ALC1KO+ALC1WT vs. WT |
0.1715527 |
0.2415037 |
0.7103521 |
0.4792079 |
| Olaparib1: ALC1KO+ALC1WT vs. ALC1KO+ALC1G750E |
-0.7621892 |
0.2415037 |
-3.1560146 |
0.0021369 |
| Olaparib2: ALC1KO+ALC1WT vs. ALC1KO+ALC1G750E |
0.2908048 |
0.2415037 |
1.2041422 |
0.2314952 |
| Olaparib3: ALC1KO+ALC1WT vs. ALC1KO+ALC1G750E |
0.3198861 |
0.2415037 |
1.3245597 |
0.1884618 |
| Olaparib1: ALC1KO+ALC1WT vs. ALC1KO+ALC1E175Q |
-1.2376155 |
0.2415037 |
-5.1246233 |
0.0000015 |
| Olaparib2: ALC1KO+ALC1WT vs. ALC1KO+ALC1E175Q |
1.1843782 |
0.2415037 |
4.9041822 |
0.0000038 |
| Olaparib3: ALC1KO+ALC1WT vs. ALC1KO+ALC1E175Q |
0.6752011 |
0.2415037 |
2.7958207 |
0.0062531 |
| Olaparib1: ALC1KO+ALC1WT vs. ALC1KO+ALC1K77R |
-1.1252042 |
0.2415037 |
-4.6591592 |
0.0000102 |
| Olaparib2: ALC1KO+ALC1WT vs. ALC1KO+ALC1K77R |
0.3638203 |
0.2415037 |
1.5064791 |
0.1352278 |
| Olaparib3: ALC1KO+ALC1WT vs. ALC1KO+ALC1K77R |
0.7313597 |
0.2415037 |
3.0283580 |
0.0031581 |
write.table(output, file = "Figure1E_Stats_Ref_ALC1KO+ALC1WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)